home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / vedt.zip / DEMO.VD2 < prev    next >
Text File  |  1990-09-19  |  7KB  |  234 lines

  1. R*
  2. R*    S U B R O U T I N E   M A C R O S
  3. R*
  4. R*    "Header" macro - displays colored header
  5. R*    Enter:  R9 = text to display, Q21 = attribute to use
  6. R*
  7. RI(H)\
  8. .wt>1[YWI]        R* Remove any windows
  9. Q27YEA YEC        R* Clear window
  10. .u9+10XS(0)        R* Q0 = total width of header
  11. (.wc-q0)/2XS(1)        R* Q1 = # spaces to center header
  12.  
  13. YEN Q1YEB        R* New line and spaces to center
  14. Q21YEA            R* Switch attribute
  15. "╔:YD            R* Box-corner
  16. q0-2["═:YD] "╗:YD    R* Box-top and box-corner
  17.  
  18. Q27YEA            R* Restore attribute
  19. YEN Q1YEB        R* New line and spaces to center
  20. Q21YEA            R* Switch attribute
  21. "║:YD            R* Box-side
  22. 4YEB            R* 4 spaces before header
  23. RD(9)            R* Actual header
  24. 4YEB            R* 4 spaces after header
  25. "║:YD            R* Box-side
  26.  
  27. Q27YEA            R* Restore attribute
  28. YEN Q1YEB        R* New line and spaces to center
  29. Q21YEA            R* Switch attribute
  30. "╚:YD            R* Box-corner
  31. q0-2["═:YD] "╝:YD    R* Box-top and box-corner
  32.  
  33. Q27YEA            R* Restore attribute
  34. YEN            R* End current line
  35. \
  36. R*
  37. R*    "Key" macro - pause for user to press any key
  38. R*
  39. RI(K)\
  40. q23YEA YT/              --- PRESS ANY KEY TO CONTINUE --- / q27YEA
  41. XK(0)//
  42. \
  43. R*
  44. R*    "List" macro - list data files one page at a time
  45. R*    Enter:  R9 = header to display
  46. R*        R8 = filename of data file
  47. R*
  48. RI(L)\
  49. EE(7) EZY        R* Switch to temp buffer and empty it
  50. ER |R8            R* Open desired file
  51. 0A            R* Read it all in
  52.  
  53. M(H)            R* Display header using R9
  54.  
  55. [            R* Start REPEAT-UNTIL loop
  56.  
  57. 6YEV 0YEH        R* Move cursor below header
  58. YES            R* Erase to to end of window
  59.  
  60. .pXS(0)            R* Save current edit position
  61. F//            R* Search for <CTRL-S> which ends this screen
  62. q0,.p-1T        R* Display one screen of text (move back to Q0)
  63. F//            R* Find same <CTRL-S> again
  64.  
  65. M(K)            R* Pause()
  66.  
  67. .eofJL            R* REPEAT-UNTIL end of file reached
  68. ]
  69.  
  70. EE(@)            R* Switch back to main buffer
  71. \
  72. R*
  73. R*    "Menu" macro - displays and prompts user with menu
  74. R*    Enter:    R8 = Multi-line menu    Q8 = attribute for menu-bar
  75. R*        R9 = header to display
  76. R*                    Q12 = initial menu item to highlight (-1)
  77. R*    Return: Q12 = user's selection number
  78. R*
  79. R*    Usage:    Q1 = # spaces to center menu
  80. R*        Q3 = Count of # lines in menu
  81. R*        Q4,Q5 = Save for cursor position
  82. R*
  83. RI(M)\
  84. M(H)            R* Display header using R9
  85.             R* Return: Q1 = # spaces to center header
  86. YEN            R* Display blank line
  87. 1XA(12)            R* Skip to next menu-line
  88. EE(8)            R* Switch to editing menu-text
  89. Z            R* Goto last line+1
  90. .ln-1XS(3)        R* Q3 = # lines in menu
  91. B
  92.  
  93. q3[            R* Loop for all lines in menu
  94.     q1YEH        R* Horizontally position on line
  95.     T L        R* Display line and goto next line
  96. ]
  97.  
  98. YEN            R* Display blank line
  99. Q1YEH            R* Horizontally position on line
  100. Q23YEA YT/Select with <SPACE BAR>; then press <Enter> / q27YEA
  101. .wxXS(5) .wyXS(6)    R* Save cursor position
  102.  
  103. [
  104.  
  105. B q12-1L        R* Position to text for menu-bar
  106. q12+5YEV q1YEH        R* Position cursor in window
  107. q8YEA            R* Highlight attribute
  108. T            R* Display text
  109. Q27YEA            R* Restore attribute
  110.  
  111. !KEY!
  112.  
  113. q5YEH q6YEV        R* Restore cursor position
  114. XK(0)//            R* Wait for keyboard input
  115.  
  116. (q0 = 13)[ JM ]        R* If <Enter>
  117.  
  118. (q0 <> 32) & (q0 <> 208) & (q0 <> 200)  [    R* If invalid key
  119.     JP/KEY/                    R* Get next key
  120. ][                        R* ELSE - <SPACE> or <Up> <Down>
  121.     B q12-1L        R* Position to text for menu-bar
  122.     q12+5YEV q1YEH        R* Position cursor in window
  123.     T            R* Display text in normal attribute
  124.     (q0 = 200) [
  125.         -XA(12) (q12 < 1) [q3XS(12)]
  126.     ][
  127.         XA(12) (q12 > q3) [1XS(12)]
  128.     ]
  129. ]
  130. ]
  131. \
  132. R*
  133. R*    Macro to display the next screen of instructions during Command
  134. R*    Mode demos.
  135. R*    Enter: Instruction text loaded into edit buffer 1.
  136. R*
  137. RI(N)\
  138. EE(1)            R* Switch to edit buffer 1
  139. @F/|L/        R* Search for next ^S
  140. (.es) [ EE(@) RJ(Z) ]    R* Return to main menu when end-of-file reached
  141. -100K B            R* Delete text preceding ^S
  142. -V            R* Display next screen
  143. EE(@)
  144. \
  145. R*
  146. R*    Macro to display signon message
  147. R*
  148. RI(S)\
  149. RI(9)/Welcome to the VEDIT Family Demonstration/
  150. M(H)            R* Display header
  151.  
  152. EE(@)
  153. YT`
  154. Welcome to the demonstration/tutorial of the VEDIT Family of text editors.
  155.  
  156. The VEDIT Family of editors includes VEDIT Jr., VEDIT and VEDIT PLUS.  Since
  157. these editors are upwards compatible, this demo is applicable to all three.
  158.  
  159. The demo is divided into 14 topics that you can select from a main menu.  The
  160. features common to all three editors are covered first.  Then the additional
  161. features in VEDIT (primarily multi-file editing and windowing) are covered.
  162. Last, the macro programming language capabilities of VEDIT PLUS are
  163. introduced.
  164.  
  165. Unlike other demonstrations which are just "slide shows", in this demo you
  166. are running a fully functional version of VEDIT PLUS.  When you are done with
  167. the demo, you can use VDEMO.EXE to edit your own files.  (The only restriction
  168. is that VDEMO won't readily write large files back to disk.)  The READ-ME.BAT
  169. file describes the practical uses of VDEMO.EXE in more detail.
  170.  
  171. ENJOY!
  172. `
  173. M(K)            R* Wait for <Enter>
  174. 5YEV 0YEH YES        R* Position cursor, clear rest of screen
  175.  
  176. YT`
  177. VEDIT Jr. has many features to make editing simple and productive:`
  178.  
  179. q22YEA            R* White on red
  180. YT`
  181.   * Intuitive full screen editing; edit text and binary files of any size       
  182.   * Pull-down menus with "hot keys", on-line help and mouse support             
  183.   * Block operations by character, line, file or column; block indent/undent    
  184.   * Completely re-configurable keyboard layout; unlimited keystroke macros      
  185.   * Multi-level UNDO (up to 1000 levels) lets you quickly recover from mistakes 
  186.   * Word processing features simplify editing of documentation, reports, etc.   
  187.   * Special features for program development (C, Assembler, PASCAL, PL/I etc.)  
  188.   * Run DOS commands and other programs from within the editor                  
  189. `
  190. q27YEA
  191. YT`
  192. VEDIT has all the features above plus:`
  193. q22YEA
  194. YT`
  195. ==> Simultaneously edit multiple files with or without windows                  
  196. ==> Integrated Compile/Link/Debug/Make support with automatic error tracking    
  197. `
  198. q27YEA
  199. YT`
  200. VEDIT PLUS adds a powerful text oriented "programming language":`
  201. q22YEA
  202. YT`
  203. ==> Eliminates repetitive editing tasks; create your own editing functions      
  204. ==> A complete application language for filters, translators and much more      
  205. ==> This demonstration is entirely written in the VEDIT PLUS macro language!    
  206. `
  207. q27YEA
  208.  
  209. M(K)
  210. 5YEV 0YEH YES
  211.  
  212. YT`
  213. This demonstration is quite in-depth and also serves as a tutorial for new 
  214. users.  It is best to run through the menu from top to bottom.  A quick 
  215. overview will take about 15 minutes while a detailed tutorial will take about
  216. an hour.  The topic marked as "Tutorial" is the most in-depth.
  217.  
  218. If you have a mouse, the mouse cursor will soon appear in the middle of the
  219. screen.  To keep it out of the way, move it to the top right corner.  The
  220. tutorial introduces mouse operation.
  221.  
  222. REMEMBER:  One window always gives explanations and directions.  The last line
  223.        tells you how to continue to the next "lesson".  You can usually
  224.        press the <ESC> key repeatedly to quickly run through the demo.
  225.  
  226.        Or you can press <ALT-F8> to return to the main menu.
  227.  
  228. IBM PC:    Use <Up Arrow> and <Down Arrow> keys to select from the main menu.
  229.  
  230. `
  231.  
  232. M(K)
  233. \
  234.